home *** CD-ROM | disk | FTP | other *** search
/ Ian & Stuart's Australian Mac 1993 September / September 93.iso / Archives / Utilities / System / FKey / FKeys / ToggleAT / ToggleAT FKEY ReadMe < prev   
Text File  |  1992-10-15  |  4KB  |  38 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6. ToggleAT is an FKEY for the Macintosh PowerBook © 1992 by Jon Pugh
  7.  
  8. This is version 3.  It fixes a problem with turning Appletalk on when it is not loaded.
  9.  
  10. The intent of this FKEY is to be able to avoid going to the Chooser to turn off AppleTalk every time you take your PowerBook on the road since this requires a menu item, a button click, an “Are you sure” dialog, an OK dialog and a close box.  Turning it back on requires a menu item, a button click, an OK dialog and a close box.  This is almost more trouble than it is worth.
  11.  
  12. Why all this bother in the first place?  Why not leave AppleTalk on all the time?  The simplest reason is power.  A battery powered Macintosh needs to run as few hardware things as it can to conserve its power for a longer running time.  In this vein you want to keep the hard disk and AppleTalk off when running on batteries.  The hard disk is pretty obvious.  In addition to drawing a lot of power, it is at least audible in many settings, reminding you to turn it off.  AppleTalk is a little more sly.  It doesn’t make noise and doesn’t remind you that it is constantly polling the hardware sending “I’m here” messages and looking for incoming messages.  When you aren’t connected this is pretty pointless, and it still draws power to poll the hardware.  So turn it off.  In addition, turning AppleTalk off puts File Sharing to sleep without turning it off so that when you turn AppleTalk back on, File Sharing starts right up (relatively speaking).  Handy, I think.  File Sharing is also a power hog because it uses the disk, keeping you from running with the disk spun down. Virtual Memory is the same way, which is why it complains when it is started up on the PowerBook.
  13.  
  14. If you never connect your Powerbook to a network, then don’t worry about this FKEY. You are too isolated to need it.  Turn Appletalk off and go back to bed.
  15.  
  16. So, I wanted an FKEY that allowed me to blast AppleTalk off with a single key combo and hit the road.  This is the ToggleAT FKEY.  It comes as resource ID 12, which is only useful if you use a macro program like QuicKeys to trigger it.  If you want to use it without such, you will need to renumber it.  You also have to figure out how to install it. I’m not your mother. I will give you a clue though; use ResEdit.
  17.  
  18. The current implementation simply turns AppleTalk on and off by opening and closing the .MPP driver, which is the lowest level of AppleTalk.  It also changes the global variable SPConfig, so the Chooser will see the setting, and then it writes this out to PRAM so that it will be remembered.
  19.  
  20. WARNING: If you crash or reboot with AppleTalk turned off you will need to reboot again to turn it back on.  BFD, I know. You have been warned though.  Note that this can be good since booting without Appletalk takes less memory.
  21.  
  22. NEW STATUS DISPLAY: Version 2 updated ToggleAT to display “AppleTalk On” or “AppleTalk Off” in the menu bar when it changes the state of AppleTalk.  It can also play a sound by that same name at that time.  If a sound by the name “AppleTalk On” or “AppleTalk Off” doesn’t exist then it will be silent.  I didn’t include a way to avoid the menu display.
  23.  
  24. VERSION 3:  I misplaced a statement which caused the change to be forgotten when AppleTalk wasn’t loaded. It was a dumb error from a misplaced if statement which skipped the call to WriteParam if MPP didn’t open, but it was present in versions 1 & 2. Version 3 also adds a menu display for when you need to reboot.
  25.  
  26. Special NaySayers Award to Tim Dierks and Steve Falkenberg for saying this FKEY couldn’t and shouldn’t be done.  It’s simple, clean and documented.  Up yours.  :¬)
  27.  
  28. Other things to do: This could use a companion INIT that will turn AppleTalk back on whenever you restart or shutdown the machine.  This way it will always be loaded even if you forget.  This doesn’t really affect this FKEY, but it’s a related item.  It’s also unlikely to get done by me since it would prevent you from booting with AppleTalk off, which I might like to do.
  29.  
  30. Feel free to send questions, comments, insults and money.
  31.  
  32. Jon Pugh
  33. 20525 Mariani Ave. MS 37-AS
  34. Cupertino, CA 95014
  35. jpugh@apple.com 
  36. Applelink: JONPUGH
  37. (408) 862-7094
  38.